package com.xuelang.pipeline.domain.pipeline.service.imp;

import com.xuelang.pipeline.client.common.request.PageParam;
import com.xuelang.pipeline.client.common.result.PageRecord;
import com.xuelang.pipeline.client.pipeline.dto.ChangeMgmtQuery;
import com.xuelang.pipeline.domain.pipeline.ChangeMgmt;
import com.xuelang.pipeline.domain.pipeline.repository.ChangeMgmtRepository;
import com.xuelang.pipeline.domain.pipeline.service.ChangeMgmtDomainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>组件变更管理域服务接口实现类</p>
 *
 * @author : yixin.lys
 * @date : 2024-08-02 13:54
 **/
@Slf4j
@Service
public class ChangeMgmtDomainServiceImpl implements ChangeMgmtDomainService {

    @Autowired
    private ChangeMgmtRepository repository;

    @Override
    public PageRecord<ChangeMgmt> page(PageParam<ChangeMgmtQuery> query) {
        return repository.page(query);
    }

    @Override
    public Boolean add(ChangeMgmt toAdd) {
        return repository.add(toAdd);
    }

    @Override
    public Boolean update(ChangeMgmt toUpdate) {
        return repository.update(toUpdate);
    }

    @Override
    public ChangeMgmt queryById(String id) {
        return repository.queryById(id);
    }

    @Override
    public Boolean removeById(String id) {
        return repository.removeById(id);
    }

    @Override
    public Boolean removeByComponentLabel(String componentLabel) {
        return repository.removeByComponentLabel(componentLabel);
    }
}
